
	  	<div id="table">
        	<table border="0px" cellpadding="0px" cellspacing="0px" cols="2" width="790px">
            	<tr>
                	<td width="80%"></td>
                    <td width="20%"><h3> Xin chào: <? echo $_SESSION['username']?> </h3></td>
                 </tr>
            </table>
 			<div id="bang">
    			<table border="1px"  bordercolor="#CCCCCC" cellpadding="0px" cellspacing="0px" cols="8" width="790px">
					<tr>
                    	<td colspan="2" width="25%" class="thongketitle">Thống kê công văn</td>
                    	<td colspan="2" width="25%" class="thongketitle">Thống kê hình ảnh</td>    
                        <td colspan="2" width="25%" class="thongketitle">Thống kê tin tức</td>    
                        <td colspan="2" width="25%" class="thongketitle">Thống kê thông báo</td>                        
                    </tr>
                    
                    <tr>
                    	<td width="15%" class="thongkecontent"> Tổng số công văn </td>
                        <td width="10%" class="thongkecontent">
							<?
							$sql="select count(idcongvan) as Tong from congvan";
							$result=mysql_query($sql) or die("Can not query congvan");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                        <td width="15%" class="thongkecontent"> Tổng số hình ảnh</td>
                        <td width="10%" class="thongkecontent"><?
							$sql="select count(idhinhanhhoatdong) as Tong from hinhanhhoatdong";
							$result=mysql_query($sql) or die("Can not query gallery");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                    
                    	<td width="15%" class="thongkecontent"> Tổng số tin tức </td>
                        <td width="10%" class="thongkecontent">
							<?
							$sql="select count(idtintuc) as Tong from tintuc";
							$result=mysql_query($sql) or die("Can not query tintuc");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                        <td width="15%" class="thongkecontent"> Tổng số thông báo </td>
                    	<td width="10%" class="thongkecontent">
							<?
							$sql="select count(idthongbao) as Tong from thongbao";
							$result=mysql_query($sql) or die("Can not query thongbao");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                    </tr>
                    	
                    <tr>
                    	<td colspan="8"> &nbsp;  </td>
                    </tr>
                    
                    <tr>
                    	<td colspan="2" width="25%" class="thongketitle">Thống kê lớp</td>
                    	<td colspan="2" width="25%" class="thongketitle">Thống kê thành tích</td>    
                        <td colspan="2" width="25%" class="thongketitle">Thống kê lịch công tác</td>    
                        <td colspan="2" width="25%" class="thongketitle">Thống kê thời khóa biểu</td>                        
                    </tr>
                    
                    <tr>
                    	<td width="15%" class="thongkecontent"> Tổng số lớp </td>
                        <td width="10%" class="thongkecontent">
							<?
							$sql="select count(idhoatdonghocsinh) as Tong from hoatdonghocsinh";
							$result=mysql_query($sql) or die("Can not query hoatdonghocsinh");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                        <td width="15%" class="thongkecontent"> Tổng số thành tích</td>
                        <td width="10%" class="thongkecontent"><?
							$sql="select count(idthanhtich) as Tong from thanhtich";
							$result=mysql_query($sql) or die("Can not query thanhtich");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                    
                    	<td width="15%" class="thongkecontent"> Số file lịch công tác</td>
                        <td width="10%" class="thongkecontent">
							<?
							$sql="select count(idlichcongtac) as Tong from lichcongtac";
							$result=mysql_query($sql) or die("Can not query lichcongtac");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                        <td width="15%" class="thongkecontent"> Số file thời khóa biểu</td>
                    	<td width="10%" class="thongkecontent">
							<?
							$sql="select count(idthoikhoabieu) as Tong from thoikhoabieu";
							$result=mysql_query($sql) or die("Can not query thoikhoabieu");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                    </tr>
                    
                     <tr>
                    	<td colspan="8"> &nbsp;  </td>
                    </tr>
                    
  					<tr>
                    	<td colspan="2" width="25%" class="thongketitle">Thống kê người dùng</td>
                    	<td colspan="2" width="25%" class="thongketitle">Thống kê website liên kết</td>    
                        <td colspan="2" width="25%" class="thongketitle">Thống kê ý kiến phản hồi</td>    
                        <td colspan="2" width="25%" class="thongketitle">Thống kê người hỗ trợ</td>                        
                    </tr>
                    
                    <tr>
                    	<td width="15%" class="thongkecontent"> Tổng số người dùng </td>
                        <td width="10%" class="thongkecontent">
							<?
							$sql="select count(idusers) as Tong from users where idnhomnguoidung = 2";
							$result=mysql_query($sql) or die("Can not query users");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                        <td width="15%" class="thongkecontent"> Tổng số website liên kết</td>
                        <td width="10%" class="thongkecontent"><?
							$sql="select count(idlienketwebsite) as Tong from lienketwebsite";
							$result=mysql_query($sql) or die("Can not query lienketwebsite");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                    
                    	<td width="15%" class="thongkecontent"> Tổng số ý kiến phản hồi </td>
                        <td width="10%" class="thongkecontent">
							<?
							$sql="select count(idlienhe) as Tong from lienhe";
							$result=mysql_query($sql) or die("Can not query lienhe");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                        <td width="15%" class="thongkecontent"> Tổng số người hỗ trợ </td>
                    	<td width="10%" class="thongkecontent">
							<?
							$sql="select count(idhotrotructuyen) as Tong from hotrotructuyen";
							$result=mysql_query($sql) or die("Can not query hotrotructuyen");
							$row=mysql_fetch_array($result);
							echo $row["Tong"];
							?>
                        </td>
                    </tr>
 
                    
        		
                </table>
            </div>           
            <div class="clear"></div>
        </div>
          </div>

	